package com.chen.bean.enums;

public enum ResultCode {
    SUCCESS(200, "成功"),
    BAD_REQUEST(400, "请求方法错误"),
    UNAUTHORIZED(401, "未授权"),
    ERROR_PARAMS(402, "参数错误"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源未找到"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    AUTHORIZED_ERROR(501, "鉴权失败");

    private int code;
    private String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}